Ubuntu 14.04
Sponsored Link

SysStat : Install
2016/01/12
 
Install SysStat to enable system monitoring.
[1] Install SysStat.
root@dlp:~#
apt-get -y install sysstat
root@dlp:~#
vi /etc/default/sysstat
# line 9: change

ENABLED="
true
"
[2] Logging is performed by cron's setting like follows.
root@dlp:~#
cat /etc/cron.d/sysstat

# The first element of the path is a directory where the debian-sa1
# script is located
PATH=/usr/lib/sysstat:/usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin

# Activity reports every 10 minutes everyday
5-55/10 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1

# Additional run at 23:59 to rotate the statistics file
59 23 * * * root command -v debian-sa1 > /dev/null && debian-sa1 60 2
[3] If you'd like to change some settings of SysStat, the configuration file is located like follows.
root@dlp:~#
vi /etc/sysstat/sysstat
# sysstat configuration file. See sysstat(5) manual page.

# How long to keep log files (in days).
# Used by sa2(8) script
# If value is greater than 28, then log files are kept in
# multiple directories, one for each month.
HISTORY=7

# Compress (using gzip or bzip2) sa and sar files older than (in days):
COMPRESSAFTER=10

# Parameters for the system activity data collector (see sadc(8) manual page)
# which are used for the generation of log files.
# By default contains the `-S DISK' option responsible for generating disk
# statisitcs. Use `-S XALL' to collect all available statistics.
# *note

SADC_OPTIONS="-S DISK"

# note
INT     ⇒  System Interrupts
DISK    ⇒  Block Devices
SNMP    ⇒  SNMP statistics
IPV6    ⇒  IPv6 statistics
POWER   ⇒  Power Management statistics
ALL     ⇒  All of the above
XDISK   ⇒  DISK + Partition statistics
XALL    ⇒  All of the above (ALL + XDISK)
 
Tweet